package GaoYuXuan.Homework0714;

import java.math.BigDecimal;
import java.math.MathContext;
import java.math.RoundingMode;

/**
 * @author 盖
 * @version 1.0
 * @since 2022-07-14 20:14:37
 */
public class Big {
    public static void main(String[] args) {
        BigDecimal a = new BigDecimal("56.74352634055349834857");
        BigDecimal b = new BigDecimal("5.74352696344133191233441324055349834857");
        BigDecimal result = a.divide(b, 30, RoundingMode.HALF_UP);
        System.out.println(result);
        BigDecimal result1 = a.multiply(b);
        BigDecimal result2 = a.multiply(b, new MathContext(30, RoundingMode.HALF_UP));
        System.out.println(result1);
        System.out.println(result2);
    }
}